<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/home.css" rel="stylesheet" type="text/css"/>
<title>Home</title>


    
    
    


</head>

<body>

<?php

include_once('functions/dataBaseConnection.php');

if (isset($_SESSION['user']) && isset($_SESSION['pass']) && isset($_SESSION['permissions'])){
	$user = $_SESSION['user'];
	$pass = $_SESSION['pass'];
	$permissions = $_SESSION['permissions'];
	if (strcmp($permissions, "admin") == 0) {
		include_once('frontend/adminHome.php');
	}
	if (strcmp($permissions, "user") == 0) {
		include_once('frontend/usersHome.php');
	}
	if (strcmp($permissions, "superadmin") == 0) {
		include_once('frontend/superadminHome.php');
	}
	
}else{
	header('Location:index.php');
}
//session_destroy();
?>

</body>
</html>
